package com.saxon.blog.Dao.User;


import com.saxon.blog.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@Mapper
public interface UserDao {
    //通过id查询用户信息
    User getUserById (@Param ("id") int id);

    //查询用户信息
    User getUser (Map<String, Object> map);

    //查询用户的数量
    int queryNum ();

    //添加数据
    int insertUser (User user);

    //修改数据
    int updateUser (Map<String, Object> map);

    //查询用户信息返回集合
    List<User> getUserWithList (Map<String, Object> map);

    //删除一个用户
    int deleteUserById (Map<String, Object> map);
}
